package com.itheima.service.impl;

import com.itheima.dao.HosipitalDao;
import com.itheima.domain.Office;
import com.itheima.domain.Patient;
import com.itheima.service.HosipitalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;



@Service
public class HosipitalServiceImpl implements HosipitalService {

    @Autowired
    private HosipitalDao hosipitalDao;

    @Override
    public List<Office> getAllOffice() {
        return hosipitalDao.getAllOffice();
    }

    @Override
    public void savePatient(Patient patient) {
            hosipitalDao.savePatient();
    }

    @Override
    public List<Patient> getAllPatient(String pname) {
        return hosipitalDao.getAllPatient();
    }

}
